package com.eliota.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * @author M.G
 * @create 2023-03-17 9:45
 * @date 2023/3/17 9:45
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField(value = "username")
    private String userName;
    @JsonIgnore//返回时Json工具转换时忽略改字段,若直接接收前端json请求字段值是空字符串
    private String password;
    @TableField(value = "nikeName")
    private String nikeName;
    private String phone;
    private String email;
    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "头像")
    private String avatarUrl;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "角色")
    private String role;

    @ApiModelProperty(value = "删除：0，未删除：1")
    private int statue;
}
